Large disparities in HIV rates in black men who have sex with men (BMSM) are not explained by higher engagement in risky behaviors and are particularly high among younger MSM. Despite the efficacy of several prevention interventions, reducing these disparities requires approaches that maximally engage these men's social and sexual networks. Because of frequently transient life circumstances, disruption of social and sexual networks and HIV transmission overlap with other groups, criminal justice involved (CJI) BMSM who use substances represent an important target for intervention. Although effective behavioral and structural interventions exist that target CJI populations, their successful implementation for CJI BMSM networks and communities has not been demonstrated. Furthermore, research to determine intervention impact at these larger social units is costly and does not readily lend itself to the randomized control trial approach. This proposal aims to utiliz a systems dynamic approach using an agent-based model (ABM) to estimate the effectiveness of HIV prevention and substance-abuse interventions for CJI substance-using BMSM. Our project brings together investigators with a proven track record in the study of BMSM, criminal justice settings, substance-abuse intervention, social network analysis, ABMs and HIV clinical care provision. We will adapt a previously developed core open access ABM platform (using Repast Simphony) that includes baseline national data on people and households by geography, as well as the dynamic features of the target population such as incarceration, health center, and activity (time-use) data. We will scale the ABM to three counties: Harris TX, Los Angeles CA, and Cook IL where our team has collected data for model parameterization. Our approach will assess the interplay between social and behavioral variables and viral and host factors in a matter that will be adaptive to temporal, network and setting-specific changes. Our aims are to: 1) Build upon our flexible ABM by incorporating HIV transmission and suppression probabilities at the individual level, including host/viral factors and biologic/behavioral data from HIV prevention and substance-abuse intervention studies; 2) Parameterize this ABM with multiple network data sources available to investigators in each city on specific transition periods of BMSM from the community, to jail, and back to the community/ supervision; such shocks lead to social and sexual network formation and disruption. We will supplement these data with newly collected data (n=50/city) specifically on network shocks and HIV prevention and treatment utilization during these critical transition periods; 3) Simulate HIV prevention interventions within criminal justice contexts using the model parameterized in Aim 2. Because our open access Repast Simphony ABM platform is widely used, we will make model parameters, specifications and variables publically available. This will allow for external validation of our findings and for additional use of the core model by others for context and community-specific integrated HIV prevention and treatment planning in at risk populations.